<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>添加供货商</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" type="text/css" href="../common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="../common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="../common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="../css/personal.css" media="all">
</head>
<body>
<section class="layui-larry-box">
	<div class="larry-personal">
		<header class="larry-personal-tit">
			<span>供货商</span>
		</header><!-- /header -->
		<div class="larry-personal-body clearfix">
			<form class="layui-form col-lg-5" action="" method="post" id="em_info">


				<div class="layui-form-item">
					<label class="layui-form-label">供货商名称</label>
					<div class="layui-input-block">
						<input type="text" id="em_name" name="name"  autocomplete="off" class="layui-input" value="">
						<input type="text" id="em_id" name="id"  autocomplete="off" class="layui-input" value="" hidden="hidden">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-block">
						<input type="text" id="admin_name" name="address"  autocomplete="off" class="layui-input" value="">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">联系人</label>
					<div class="layui-input-block">
						<input type="text" id="su_linkman" name="linkman"  autocomplete="off" class="layui-input" value="">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-block">
						<input type="text" id="em_phonenum" name="phonenum"  autocomplete="off" class="layui-input" placeholder="">
						<!--添加员工默认在职-->
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">邮编号码</label>
					<div class="layui-input-block">
						<input type="text" id="su_postcode" name="postcode"  autocomplete="off" class="layui-input" placeholder="">
						<!--添加员工默认在职-->
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">传真号码</label>
					<div class="layui-input-block">
						<input type="text" id="su_faxnum" name="faxnum"  autocomplete="off" class="layui-input" placeholder="">
						<!--添加员工默认在职-->
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">邮箱账号</label>
					<div class="layui-input-block">
						<input type="text" id="su_email" name="email"  autocomplete="off" class="layui-input" placeholder="">
						<!--添加员工默认在职-->
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">合作状态</label>
					<div class="layui-input-inline">
						<select name="state" class="newsLook" lay-filter="browseLook" id="em_state">
							<option value="0" >合作</option>
							<option value="1" >未合作</option>
						</select>
					</div>
				</div>



				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" type="button" onclick="addemployee()" lay-filter="demo1">立即提交</button>
						<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					</div>
				</div>
			</form>
		</div>
	</div>


</section>
<script type="text/javascript" src="../common/layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="../js/login.js"></script>
<script type="text/javascript" src="../jsplug/jparticle.jquery.js"></script>
<script type="text/javascript" src="../common/layui/layui.js"></script>
<script src="../js/token.js"></script>
<script type="text/javascript">


	/*添加员工操作*/
	function addemployee(){
		$.post("/supplier/addsupplier",$("#em_info").serialize(),function(res){
			layer.confirm('员工添加成功，前往查看！', {
			icon: 1,        //会出现正确的图片
			btn: ['好']     //按钮
		}, function(){
			window.location.href="supplier_table.html";//点击“好”后进行跳转
		});

		},"json")
}

	/**
	 * 修改员工信息
	 */




	layui.use(['form','upload'],function(){
		var form = layui.form();
		form.render();
		layui.upload({
			url: '' ,//上传接口
			success: function(res){
				//上传成功后的回调
				console.log(res)
			}
		});

	});

</script>
</body>
</html>